Jared Knowles
R has recently passed Stata on Google Scholar hits and it is catching up to the two major players SPSS and SAS
R is linked to from more and more sites
These links come from the explosion of add-on packages to R
Usage of the R listserv for help has really exploded recently
Read in Data
studat <- read.csv("data/smalldata.csv")
str(studat[, 24:32])
## 'data.frame': 2700 obs. of 9 variables:
## $ schoolscore: num 29.2 56 56 56 56 ...
## $ district : int 3 3 3 3 3 3 3 3 3 3 ...
## $ schoolhigh : int 0 0 0 0 0 0 0 0 0 0 ...
## $ schoolavg : int 1 1 1 1 1 1 1 1 1 1 ...
## $ schoollow : int 0 0 0 0 0 0 0 0 0 0 ...
## $ readSS : num 357 264 370 347 373 ...
## $ mathSS : num 387 303 365 344 441 ...
## $ proflvl : Factor w/ 4 levels "advanced","basic",..: 2 3 2 2 2 4 4 4 3 2 ...
## $ race : Factor w/ 5 levels "A","B","H","I",..: 2 2 2 2 2 2 2 2 2 2 ...
# source('data/simulate_data.R')
source("ggplot2themes.R")
library(ggplot2)
qplot(readSS, mathSS, data = studat, alpha = I(0.2)) + geom_smooth(aes(group = ell,
color = factor(ell))) + theme_dpi()
plot of chunk unnamed-chunk-1
samp <- sample(studat$stuid, 24)
plotsub <- subset(studat, stuid %in% samp)
qplot(grade, readSS, data = plotsub) + facet_wrap(~stuid, nrow = 4,
ncol = 6) + theme_dpi() + geom_line() + geom_smooth(method = "lm", se = FALSE)
plot of chunk unnamed-chunk-2